<template>
	<gui-page>
		<template v-slot:gBody>
			<view class="gui-margin">
				<view class="gui-title-text gui-h4 gui-text-center" style="margin-bottom: 20rpx;">
					{{notice.title}}
				</view>
				<view class="gui-title-text gui-box-shadow-sm">
					<rich-text :nodes="notice.content">
					</rich-text>
				</view>
				<view class="gui-text-small gui-color-gray">
					发布时间：{{notice.CreatedAt}}
				</view>
			</view>
		</template>
	</gui-page>
</template>
<script setup>
	import {
		ref
	} from 'vue'
	import {
		onLoad
	} from '@dcloudio/uni-app'
	import useNotice from '@/api/notice'
	import request from '@/utils/request';
	const {
		showNotice,
		notice
	} = useNotice()
	const id = ref()
	onLoad(async (options) => {
		id.value = (+options.id)
		await showNotice(id.value)
		console.log(notice.value)
	})
</script>
<style scoped>
</style>